package cn.itsource.pethome.org.mapper;

import cn.itsource.pethome.org.domain.Department;
import cn.itsource.pethome.org.query.DepartmentQuery;

import java.util.List;

/**
 * 部门相关mapper
 */
public interface DepartmentMapper {
    /**
     * 增加部门
     * @param department //部门
     */
    void save(Department department);

    /**
     * 修改部门
     * @param department//部门
     */
    void update(Department department);

    /**
     * 根据id删除
     * @param id //主键id
     */
    void delete(Long id);

    /**
     * 根据id查询
     * @param id //主键id
     * @return
     */
    Department findById(Long id);

    /**
     * 查询所有
     * @return
     */
    List<Department> findAll();

    /**
     * 获取总条数
     * @param departmentQuery 查询条件
     * @return
     */
    Long findCount(DepartmentQuery departmentQuery);

    /**
     * 根据条件查询列表
     * @param departmentQuery
     * @return
     */
    List<Department> findByQuery(DepartmentQuery departmentQuery);
}
